package com.example.xpvideo.config;

import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.IllegalSQLInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @author : 洪俊新
 * @date : 2021/1/20 15:12
 * @description:
 */
@Configuration
public class MybatisPlusConfig {

    @Bean
    public MySqlInjector sqlInjector(){
        return new MySqlInjector();
    }


    @Bean
    @Profile({"default"})
    public IllegalSQLInnerInterceptor illegalSQLInnerInterceptor() {

        return new IllegalSQLInnerInterceptor();
    }

    @Bean
    public BlockAttackInnerInterceptor blockAttackInnerInterceptor() {

        return new BlockAttackInnerInterceptor();
    }
}